package org.jeecg.modules.flower.service;

import org.jeecg.modules.flower.entity.FlowerPreinfo;
import org.jeecg.modules.flower.entity.FlowerPre;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.flower.entity.FlowerPreinfoHs;

import java.io.IOException;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 销售确认单主表
 * @Author: jeecg-boot
 * @Date: 2022-06-27
 * @Version: V1.0
 */
public interface IFlowerPreService extends IService<FlowerPre> {

    /**
     * 添加一对多
     */
    public void saveMain(FlowerPre flowerPre, List<FlowerPreinfo> flowerPreinfoList, List<FlowerPreinfoHs> flowerPreinfoHsList) throws IOException;

    /**
     * 修改一对多
     */
    public void updateMain(FlowerPre flowerPre, List<FlowerPreinfo> flowerPreinfoList, List<FlowerPreinfoHs> flowerPreinfoHsList) throws IOException;

    /**
     * 删除一对多
     */
    public void delMain(String id) throws IOException;

    /**
     * 批量删除一对多
     */
    public void delBatchMain(Collection<? extends Serializable> idList) throws IOException;

    /**
     * 财务审核--扣减预出库数据
     *
     * @return void
     * @descriptionauthor
     * @author gf
     * 2022-12-22 14:11
     * [id]
     */
    void finSureOut(FlowerPre flowerPre);

    /**
     * 财务审核--扣减预出库数据--撤销
     *
     * @return void
     * @descriptionauthor
     * @author gf
     * 2023-2-16 0:08
     * [flowerPre]
     */
    void finSureOutBack(FlowerPre flowerPre);


    /**
     * 扣减预出库库存-- 根据预出库单号
     *
     * @return void
     * @descriptionauthor
     * @author gf
     * 2022-12-22 14:11
     * [id]
     */
    void subTagPreInfo(FlowerPre flowerPre);

    /**
     * 扣减预出库库存-- 根据预出库单号 --撤销
     *
     * @return void
     * @descriptionauthor
     * @author gf
     * 2022-12-26 14:43
     * [flowerPre]
     */
    void subTagPreInfoBack(FlowerPre flowerPre);
}
